<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>test</title>
    <script src="./qwebchannel.js"></script>
	
	<style type="text/css">
            html {
                height: 100%;
                width: 100%;
            }
            #send {
                width: 90px;
                margin: 0;
            }
        </style>
	
	
  </head>
  <body style="background:#282c34;">
    <h3 style="color:#ffffff;">this is web page</h3>
    <input type="button" id="send" value="send_qt" onclick="onShowMsgBox()">
    <script>
      new QWebChannel(qt.webChannelTransport, function(channel) {
        window.content = channel.objects.content;
		
		content.sendText.connect(function(message) {
                    alert('this is web alert'+ message);
                });
      });
	  
      function onShowMsgBox() {
		alert('btnClicked');
        if (content) {
          content.receiveText("hello, Qt! I'm html...");
        }
      }

      function showAlert(msg) {
        alert('this is web alert'+ msg);
      }
    </script>
		
  </body>
</html>